package com.mfc.education.service.email.controller;

import com.mfc.education.common.base.result.R;
import org.aspectj.weaver.ast.Or;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author mfc
 * @since 2021/10/6
 */
@RestController()
@RequestMapping("/email/sample")
@RefreshScope
public class SampleController {


    @Value("${spring.mail.username}")
    private String username;

    @GetMapping("test")
    public R test() {
        return R.ok().data("username", username);
    }
}
